package com.cloud.poetry.base.file;

import java.io.FileInputStream;
import java.io.InputStream;

/**
 * @author mengxj
 */
public class Test {

    public static void main(String[] args) {
        ExcelReader.ExcelRow excel = (rowData, title, sheetName) -> {
            StringBuilder builder = new StringBuilder();
            builder.append("sheet页名称：").append(sheetName).append(" sheet表头：");
            title.forEach(builder::append);
            rowData.forEach((k, v) -> builder.append(" ").append(k).append("：").append(v));
            System.out.println(builder.toString());
        };
        long start = System.currentTimeMillis();
        ExcelReader reader = ExcelReader.getInstance(excel);
        String path = "E:\\logs\\dingding\\test.xlsx";
        try (InputStream in = new FileInputStream(path)){
            reader.read(in);
        }catch (Exception e){
            e.printStackTrace();
        }
        System.out.println(System.currentTimeMillis() - start);
    }
}
